package com.jiang.daily.Q3110;

/**
 * @author Jiang
 * @version 1.0
 * @date 2025/03/15 11:03
 */
class Solution {
    public int scoreOfString(String s) {
        char[] arr = s.toCharArray();
        int res = 0;
        for (int i = 0; i < arr.length - 1; i++) {
            res += Math.abs(arr[i] - arr[i + 1]);
        }
        return res;
    }
}
